/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* 导航栏 */
header {
    background-color: #333;
    padding: 1rem;
}

nav {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    max-width: 1200px;
    margin: 0 auto;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 当前页面高亮 */
nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 主要内容区 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 登录/注册表单 */
.login-container,
.register-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

button {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

/* 消息提示 */
.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    margin-top: 2rem;
}

/* 主页样式 */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.battle-list,
.character-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.battle-list li,
.character-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.status.preparing { background-color: #ffd700; }
.status.in_progress { background-color: #90ee90; }
.status.finished { background-color: #d3d3d3; }
.status.paused { background-color: #ffa07a; }

.more-link {
    display: block;
    text-align: right;
    margin-top: 1rem;
    color: #007bff;
    text-decoration: none;
}

.empty-message {
    color: #666;
    text-align: center;
    margin: 2rem 0;
}

.action-button {
    display: block;
    text-align: center;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin: 1rem auto;
    max-width: 200px;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.button {
    padding: 0.75rem 1.5rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.button:hover {
    background-color: #0056b3;
}

/* 登录表单样式 */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form .form-group label {
    display: inline-block;
    width: 80px;
    text-align: right;
    margin-right: 1rem;
}

.login-form .form-group input {
    width: calc(100% - 100px);
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-form .error-message {
    color: #dc3545;
    margin-bottom: 1rem;
    text-align: center;
}

.login-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.login-form button:hover {
    background-color: #0056b3;
}

.register-link {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.register-link a {
    color: #007bff;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* 表单容器 */
.template-form-container,
.character-form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 表单样式 */
.template-form,
.character-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.help-text {
    font-size: 0.875rem;
    color: #666;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
}

/* 网格布局 */
.attributes-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* 模板选择器 */
.template-selector {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.template-item {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
}

.template-item h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    color: #666;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* 按钮样式 */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.button.cancel {
    background-color: #6c757d;
}

.button.cancel:hover {
    background-color: #5a6268;
}

/* 列表页面样式 */
.template-grid,
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.template-card,
.character-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
}

.page-link:hover {
    background-color: #f8f9fa;
}

.current {
    padding: 0.5rem 1rem;
    color: #666;
}

/* 角色列表样式 */
.character-list-container {
    padding: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar {
    margin-bottom: 20px;
}

.character-grid {
    margin-bottom: 20px;
}

.character-card {
    margin-bottom: 20px;
}

.character-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.character-header h3 {
    margin: 0;
}

.attributes {
    margin-bottom: 15px;
}

.stats {
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.stat-item .label {
    color: #666;
}

.stat-item .value {
    font-weight: bold;
}

.actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* 表单分组标题 */
.el-tab-pane h3 {
    margin: 20px 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
} 